// src/router/modules/master.js
import { RouterView } from 'vue-router'

export default {
    path: 'master',
    name: 'Master',
    component: RouterView,               // 只渲染子路由，不再嵌套 Layout
    redirect: '/master/constanttype',    // 访问 /master 时自动跳到“常数类别管理”
    meta: {
        title: '系统管理',
        icon: 'Setting'
    },
    children: [
        {
            path: 'constanttype',
            name: 'ConstantType',
            component: () => import('@/views/master/Constanttype.vue'),
            meta: { title: '常数类别管理' }
        },
        {
            path: 'constantitem',
            name: 'ConstantItem',
            component: () => import('@/views/master/Constantitem.vue'),
            meta: { title: '常数项管理' }
        },
        {
            path: 'user',
            name: 'User',
            component: () => import('@/views/master/User.vue'),
            meta: { title: '用户管理' }
        },
        {
            path: 'dept',
            name: 'Dept',
            component: () => import('@/views/master/Dept.vue'),
            meta: { title: '科室管理' }
        },
        {
            path: 'regLevel',
            name: 'RegLevel',
            component: () => import('@/views/master/RegLevel.vue'),
            meta: { title: '挂号级别管理' }
        },
        {
            path: 'settle',
            name: 'Settle',
            component: () => import('@/views/master/Settle.vue'),
            meta: { title: '结算类别管理' }
        },
        {
            path: 'diag',
            name: 'Diag',
            component: () => import('@/views/master/Diag.vue'),
            meta: { title: '诊断目录管理' }
        },
        {
            path: 'service',
            name: 'Service',
            component: () => import('@/views/master/Service.vue'),
            meta: { title: '非药品收费项目管理' }
        },
        {
            path: 'schedule',
            name: 'Schedule',
            component: () => import('@/views/master/Schedule.vue'),
            meta: { title: '医生排班管理' }
        }
    ]
}
